package top.yisen614.sharedelement

import android.os.AsyncTask
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import butterknife.BindView
import butterknife.ButterKnife
import top.yisen614.sharedelement.util.Image
import top.yisen614.sharedelement.util.ImageLoader

class MainActivity : AppCompatActivity() {

    @BindView(R.id.main_recycler)
    lateinit var recyclerView: RecyclerView

    private val images = ImageLoader().execute().get()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        // 在设置contentView之后
        ButterKnife.bind(this)

        recyclerView.layoutManager = LinearLayoutManager(this)

        recyclerView.adapter = RecyclerAdapter(images)
    }
}
